// var navJson=[
// 	{
// 		"id":1,
// 		"level":1,
// 		"menuName":"相关配置",
// 		"subMenus":[
// 			{"id":101,"level":2,"menuName":"网站基本配置","url":"sysConfig/sysConfigSet.html"},
// 			{"id":102,"level":2,"menuName":"网站文章管理","url":"sysConfig/articleList.html"},
// 			{"id":103,"level":2,"menuName":"修改后台密码","url":"sysConfig/editPassword.html"}
// 		]
// 	},
// 	{
// 		"id":2,
// 		"level":1,
// 		"menuName":"后台用账号相关",
// 		"subMenus":[
// 			{"id":201,"level":2,"menuName":"后台账号管理","url":"manager/managerList.html"},
// 			{"id":202,"level":2,"menuName":"部门管理","url":"manager/departmentList.html"},
// 			{"id":203,"level":2,"menuName":"权限管理","url":""}
// 		]
// 	},
// 	{
// 		"id":3,
// 		"level":1,
// 		"menuName":"用户相关",
// 		"subMenus":[
// 			{"id":301,"level":2,"menuName":"用户管理","url":"user/userList.html"},
// 			{"id":302,"level":2,"menuName":"认证申请管理","url":"user/userAuthList.html"},
// 			{"id":303,"level":2,"menuName":"资金明细","url":"user/moneyDetailList.html"},
// 			{"id":304,"level":2,"menuName":"提现管理","url":"user/withdrawalList.html"},
// 			{"id":305,"level":2,"menuName":"优惠券管理","url":"user/couponList.html"},
// 		]
// 	},
// 	{
// 		"id":4,
// 		"level":1,
// 		"menuName":"商家相关",
// 		"subMenus":[
// 			{"id":401,"level":2,"menuName":"商家管理","url":"shop/shopList.html"},
// 			{"id":402,"level":2,"menuName":"商家申请管理","url":"shop/shopAuthList.html"},
// 			{"id":403,"level":2,"menuName":"产品管理","url":"shop/productList.html"},
// 			{"id":404,"level":2,"menuName":"产品分类管理","url":"shop/proClassList.html"},
// 			{"id":405,"level":2,"menuName":"订单管理","url":"shop/orderList.html"}
// 		]
// 	},
// 	{
// 		"id":5,
// 		"level":1,
// 		"menuName":"广告相关",
// 		"subMenus":[
// 			{"id":501,"level":2,"menuName":"广告位分类管理","url":"advertisement/adClassList.html"},
// 			{"id":502,"level":2,"menuName":"广告管理","url":"advertisement/adList.html"}
// 		]
// 	}
// ];	
$(function(){
	// $.get('json/nav.json',function(data){
		// var html='';
		// $.each(navJson,function(index,el){
		// 	html+='<div class="nav-title"><span class="sui-icon icon-pc-chevron-bottom"></span>'+el.menuName+'</div>';
		// 	html+='<ul class="nav-trans">';
		// 	$.each(el.subMenus,function(index,el2){
		// 		html+='<li><a href="javascript:;" rel="'+el2.url+'" class="iframeSrc">'+el2.menuName+'</a></li>';
		// 	});
		// 	html+='</ul>';
		// });
		// $("#navList").html(html);
	//})
});
$(document).on('click','.nav-title',function(){
	var _this=$(this);
	$(".nav-title").not(_this).removeClass("fold");
	$(".nav-trans").not(_this.next()).slideUp('fast');
	_this.next("ul").toggle(100,function(){
		_this.toggleClass("fold");
	});
});
//加载iframe
$(document).on('click','.iframeSrc',function(){
	var iframeId=$("#iframe");
	var url=$(this).attr("rel");
	iframeId.attr("src",url);
});
//退出登录
$("#loginOut").click(function () {
    jConfirm("确定要退出吗？", "提示", function (r) {
        if (r) {
            $.ajax({
                url: "../doAdminAction.php?act=loginOut",
                type: "get"
            }).done(function(data){
            	window.location.href = "login.php";
            });
        }
    });
});
